package top.littlejiang.onlinexam.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import org.apache.ibatis.annotations.Param;
import top.littlejiang.onlinexam.entity.OlexamExam;
import top.littlejiang.onlinexam.entity.OlexamUser;

import java.util.List;

/**
 * <p>
 * 考试表 Mapper 接口
 * </p>
 *
 * @author chen
 * @since 2021-03-11
 */
public interface OlexamExamMapper extends BaseMapper<OlexamExam> {

    /**
     * 列表查询
     * @param wrapper
     * @return
     */
    List<OlexamExam> getExamList(@Param(Constants.WRAPPER) QueryWrapper<OlexamExam> wrapper);

    /**
     * 根据考试id查询所有应参考学生id及name
     * @param examUuid
     * @return
     */
    List<OlexamUser> selectUsersByExam(@Param("examUuid") String examUuid);
}
